const fs = require('fs')

async function fn() {
    let a = await getpromise('a')
    console.log(a);
    let b= await getpromise('b')
    console.log(b);
    let c = await getpromise('c')
    console.log(c);
}
fn()
function getpromise(prom) {
    return new Promise((resolve, reject) => {
    fs.readFile(`${__dirname}/${prom}.txt`, 'utf-8', (err, data) => {
        if (err) {
            reject(err);
        } else {
            resolve(data);
        }
    })
})
}
// getpromise('a').then(data => {
//     console.log(data);
// })